import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [

    {
      path: '/',
      name: 'login',
      component: () => import('../views/BaseData/LoginView.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../views/MainView.vue'),
      redirect: '/homepage',
      children: [
        {
          path: '/homepage',
          name: 'homepage',
          component: () => import('../views/HomePage/HomePage.vue'),
        },
        {
          path: '/home',
          name: 'home',
          component: HomeView,
        },
        {
          path: '/about',
          name: 'about',
          component: () => import('../views/AboutView.vue'),
        },
        {
          path: '/userlist',
          name: 'userlist',
          component: () => import('../views/BaseData/UserList.vue'),
        },
        {
          path: '/permissionlist',
          name: 'permissionlist',
          component: () => import('../views/BaseData/PermissionList.vue'),
        },
        {
          path: '/rolelist',
          name: 'rolelist',
          component: () => import('../views/BaseData/RoleList.vue'),
        },
        {
          path: '/userlist2',
          name: 'userlist2',
          component: () => import('../views/BaseData/UserList2.vue'),
        },
        {
          path: '/Appointmentcenter',
          name: 'Appointmentcenter',
          component: () => import('../views/Appointment/Appointmentcenter.vue'),
        },
        {
          path: '/Details',
          name: 'Details',
          component: () => import('../views/Appointment/Details.vue'),
        },
        

        {
          path: '/DoctorSchedulingView',
          name: 'DoctorSchedulingView',
          component: () => import('../views/DoctorScheduling/DoctorSchedulingView.vue'),
        },
        
        {
          path: '/outpatient-expenses',
          name: 'outpatient-expenses',
          component: () => import('../views/Amount/OutpatientExpenses.vue'),
        },
         
        {
          path: '/Departments',
          name: 'Departments',
          component: () => import('../views/HospitalInformation/Departments.vue'),
        },
         {
          path: '/Doctors',
          name: 'Doctors',
          component: () => import('../views/HospitalInformation/Doctors.vue'),
        },
        {
          path: '/DoctorSchedulingView',
          name: 'DoctorSchedulingView',
          component: () => import('../views/DoctorScheduling/DoctorSchedulingView.vue'),
        },

        {
          path: '/outpatient-expenses',
          name: 'outpatient-expenses',
          component: () => import('../views/Amount/OutpatientExpenses.vue'),
        },
        {
          path: '/outpatientrecharge',
          name: 'outpatientrecharge',
          component: () => import('../views/Amount/Outpatientrecharge.vue'),
        },
        {
          path: '/refund-record',
          name: 'refund-record',
          component: () => import('../views/Amount/RefundRecord.vue'),
        },
        {
          path: '/notice-list',
          name: 'notice-list',
          component: () => import('../views/NoticeManagement/NoticeList.vue'),
        },
      ]
    },
  ],
})

export default router
